#ifndef DETECTIONDAO_H
#define DETECTIONDAO_H

#include <QSqlError>
#include <QSqlQuery>
#include "detection.h"

class DetectionDao
{
public:
    DetectionDao();

private:
    QSqlQuery query;

public:
    int insert(Detection &detection);
    int updateByPrimay(Detection &detection);
    int deleteByPrimay(Detection &detection);
    int queryAll(QList<Detection *> &list);
    int queryBySeatId(QList<Detection *> &list, int seatId);
};

#endif // DETECTIONDAO_H
